<?php
/**
 * Openjrtc
 *
 * @category Jdcloud
 * @package  DragonJd\Openjrtc
 * @author   Jdcloud <jdcloud-api@jd.com>
 * @license  Apache-2.0 http://www.apache.org/licenses/LICENSE-2.0
 * @link     https://www.jdcloud.com/help/faq
 */

namespace DragonJd\Openjrtc;

use DragonJd\JdCloudClient;
use DragonJd\Api\Service;
use DragonJd\Api\DocModel;
use DragonJd\Api\ApiProvider;
use DragonJd\PresignUrlMiddleware;

/**
 * Client used to interact with openjrtc.
 *
 * @method \DragonJd\Result startAsrTask(array $args = [])
 * @method \GuzzleHttp\Promise\Promise startAsrTaskAsync(array $args = [])
 * @method \DragonJd\Result stopAsrTask(array $args = [])
 * @method \GuzzleHttp\Promise\Promise stopAsrTaskAsync(array $args = [])
 * @method \DragonJd\Result describeApps(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeAppsAsync(array $args = [])
 * @method \DragonJd\Result describeApp(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeAppAsync(array $args = [])
 * @method \DragonJd\Result describeAppKey(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeAppKeyAsync(array $args = [])
 * @method \DragonJd\Result createRoom(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createRoomAsync(array $args = [])
 * @method \DragonJd\Result describeRoomInfo(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeRoomInfoAsync(array $args = [])
 * @method \DragonJd\Result updateRoom(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateRoomAsync(array $args = [])
 * @method \DragonJd\Result deleteRoom(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteRoomAsync(array $args = [])
 * @method \DragonJd\Result describeRooms(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeRoomsAsync(array $args = [])
 * @method \DragonJd\Result describeRoomOnlineUserNum(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeRoomOnlineUserNumAsync(array $args = [])
 * @method \DragonJd\Result removeRoomUser(array $args = [])
 * @method \GuzzleHttp\Promise\Promise removeRoomUserAsync(array $args = [])
 * @method \DragonJd\Result removeAllRoomUsers(array $args = [])
 * @method \GuzzleHttp\Promise\Promise removeAllRoomUsersAsync(array $args = [])
 * @method \DragonJd\Result describeOnlineUserNum(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeOnlineUserNumAsync(array $args = [])
 * @method \DragonJd\Result describeUserRecordByRoom(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeUserRecordByRoomAsync(array $args = [])
 * @method \DragonJd\Result describeP2pStreamBitRate(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeP2pStreamBitRateAsync(array $args = [])
 * @method \DragonJd\Result describeCallDurationByCodeRate(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeCallDurationByCodeRateAsync(array $args = [])
 * @method \DragonJd\Result describeDailyCallDuration(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeDailyCallDurationAsync(array $args = [])
 * @method \DragonJd\Result createUser(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createUserAsync(array $args = [])
 * @method \DragonJd\Result describeUserByPeer(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeUserByPeerAsync(array $args = [])
 * @method \DragonJd\Result startMcuTranscode(array $args = [])
 * @method \GuzzleHttp\Promise\Promise startMcuTranscodeAsync(array $args = [])
 * @method \DragonJd\Result stopMcuTranscode(array $args = [])
 * @method \GuzzleHttp\Promise\Promise stopMcuTranscodeAsync(array $args = [])
 * @method \DragonJd\Result sendMessageToUser(array $args = [])
 * @method \GuzzleHttp\Promise\Promise sendMessageToUserAsync(array $args = [])
 * @method \DragonJd\Result sendMessageToRoom(array $args = [])
 * @method \GuzzleHttp\Promise\Promise sendMessageToRoomAsync(array $args = [])
 * @method \DragonJd\Result addPushStreamRule(array $args = [])
 * @method \GuzzleHttp\Promise\Promise addPushStreamRuleAsync(array $args = [])
 * @method \DragonJd\Result addRecordRule(array $args = [])
 * @method \GuzzleHttp\Promise\Promise addRecordRuleAsync(array $args = [])
 * @method \DragonJd\Result registerUser(array $args = [])
 * @method \GuzzleHttp\Promise\Promise registerUserAsync(array $args = [])
 * @method \DragonJd\Result describeRegisterUser(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeRegisterUserAsync(array $args = [])
 * @method \DragonJd\Result describeRegisterUsers(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeRegisterUsersAsync(array $args = [])
 * @method \DragonJd\Result describeStreamInfosByUserRoomId(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeStreamInfosByUserRoomIdAsync(array $args = [])
 * @method \DragonJd\Result describeStreamInfosByUserId(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeStreamInfosByUserIdAsync(array $args = [])
 * @method \DragonJd\Result describeStreamInfoByStreamId(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeStreamInfoByStreamIdAsync(array $args = [])
 * @method \DragonJd\Result describeStreamRecordsByUserId(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeStreamRecordsByUserIdAsync(array $args = [])
 * @method \DragonJd\Result describeStreamRecordsByStreamId(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeStreamRecordsByStreamIdAsync(array $args = [])
 * @method \DragonJd\Result removeUserByUserRoomId(array $args = [])
 * @method \GuzzleHttp\Promise\Promise removeUserByUserRoomIdAsync(array $args = [])
 * @method \DragonJd\Result removeAllUsersByUserRoomId(array $args = [])
 * @method \GuzzleHttp\Promise\Promise removeAllUsersByUserRoomIdAsync(array $args = [])
 * @method \DragonJd\Result describeRoomUsers(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeRoomUsersAsync(array $args = [])
 * @method \DragonJd\Result describeRoomUser(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeRoomUserAsync(array $args = [])
 * @method \DragonJd\Result describeRoomUsersNum(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeRoomUsersNumAsync(array $args = [])
 * @method \DragonJd\Result closeRoomUserStream(array $args = [])
 * @method \GuzzleHttp\Promise\Promise closeRoomUserStreamAsync(array $args = [])
 * @method \DragonJd\Result createToken(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createTokenAsync(array $args = [])
 * @method \DragonJd\Result postMessageToUserRoom(array $args = [])
 * @method \GuzzleHttp\Promise\Promise postMessageToUserRoomAsync(array $args = [])
 * @method \DragonJd\Result postMessageToUser(array $args = [])
 * @method \GuzzleHttp\Promise\Promise postMessageToUserAsync(array $args = [])
 * @method \DragonJd\Result registerUserRoom(array $args = [])
 * @method \GuzzleHttp\Promise\Promise registerUserRoomAsync(array $args = [])
 * @method \DragonJd\Result updateUserRoom(array $args = [])
 * @method \GuzzleHttp\Promise\Promise updateUserRoomAsync(array $args = [])
 * @method \DragonJd\Result describeUserRoom(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeUserRoomAsync(array $args = [])
 * @method \DragonJd\Result describeUserRooms(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeUserRoomsAsync(array $args = [])
 */
class OpenjrtcClient extends JdCloudClient
{
    public function __construct(array $args)
    {
        $args['with_resolved'] = function (array $args) {
            $this->getHandlerList()->appendInit(
                PresignUrlMiddleware::wrap(
                    $this,
                    $args['endpoint_provider'],
                    [
                        'operations' => [
                        ],
                        'service' => 'openjrtc',
                        'presign_param' => 'PresignedUrl',
                    ]
                ),
                'openjrtc'
            );
        };

        parent::__construct($args);
    }
}